import 'package:flutter_douban/model/user_model.dart';
import 'package:json_annotation/json_annotation.dart';

import 'content_model.dart';
part 'note_content_model.g.dart';

/// 评论模型数组
class NoteContentModellList {
  List<NoteContentModel> list;
  NoteContentModellList(this.list);
  factory NoteContentModellList.fromJson(List<dynamic> list) {
    return NoteContentModellList(
      list.map((item) => NoteContentModel.fromJson(item)).toList(),
    );
  }
}

@JsonSerializable()
class NoteContentModel {
  /// 评论文字
  String? c;
  /// 颜色
  String? color;
  /// 头像
  String? icon;
  /// 评论id
  String? id;
  /// 类型
  int? type;
  /// 作者信息
  String? u;
  /// 颜色
  String? ac;
  /// 地址
  String? city;
  /// 地址
  String? at;
  int? ccc;
  int? cmc;
  /// 评论内容
  List<ContentModel>? content;
  /// 是否喜欢
  int? like;
  /// 喜欢数量
  int? like_count;

  NoteContentModel(this.c,this.color,this.icon,this.id,this.type,this.ac,this.at
      ,this.ccc,this.cmc,this.content,this.like,this.like_count,this.u,this.city);
  factory NoteContentModel.fromJson(Map<String,dynamic> json) => _$NoteContentModelFromJson(json);
  Map<String, dynamic> toJson() => _$NoteContentModelToJson(this);

}
